<div class="header">
  <back-Btn></back-Btn>
  工程款
</div>
<div class="container finance">
  <div class="list f_sk">
    <div class="list-item icon_more required" ng-click="choosePeople()">
      <div class="item-label">工程名称</div>
      <div class="flow-content">
        {{param.projectName}}
      </div>
    </div>
    <div class="list-item icon_more" ng-click="choosegck()">
      <div class="item-label">收款(工程款)</div>
      <div class="flow-content">
        {{param.receiveMoneyNo}}
      </div>
    </div>
    <div class="list-item icon_more" ng-click="chooseRecord()">
      <div class="item-label">完税凭证</div>
      <div class="flow-content">{{param.taxRecordNo}}</div>
    </div>
    <div class="list-item">
      <div class="item-label">款项来源人</div>
      <div class="flow-content">
        <input type="text" ng-model="param.moneyRes" />
      </div>
    </div>
    <div class="list-item">
      <div class="item-label">公司收款帐户</div>
      <div class="flow-content">
        <input type="text" ng-model="param.receiptName" />
      </div>
    </div>
    <div class="list-item">
      <div class="item-label">本次来款金额</div>
      <div class="flow-content">
        <input type="text" ng-model="param.comeIntoAmount" tel-directive/>
      </div>
    </div>
    <div class="list-item readonly">
      <div class="item-label">结余金额(含押金)</div>
      <div class="flow-content">
        {{param.projectIncome}}
      </div>
    </div>
    <div class="list-item icon_more required">
      <div class="item-label">营业税发票</div>
      <label class="flow-content">
        <select ng-model="param.hasInvoice" ng-options="item.value as item.key for item in hasInvoiceArr" ng-change="invoicechange()">
        </select>
      </label>
    </div>
    <div class="selectinfo required" ng-show="param.hasInvoice=='已提供'">
      <div class="info-title">税票编号</div>
      <div class="table-list">
        <div class="table-item">
          <div class="list-item icon_more">
            <div class="flow-content" ng-click="chooseTax()">{{param.taxReceiptNo}}</div>
          </div>
          <div class="list-item icon_more">
            <div class="flow-content" ng-click="chooseTax('taxReceiptNo2')">{{param.taxReceiptNo2}}</div>
          </div>
          <div class="list-item icon_more">
            <div class="flow-content" ng-click="chooseTax('taxReceiptNo3')">{{param.taxReceiptNo3}}</div>
          </div>
        </div>
      </div>
    </div>
    <div class="list-item list-item-textarea">
      <div class="item-label">付款事由</div>
      <div class="flow-content">
        <textarea cols="30" rows="10" ng-model="param.remark"></textarea>
      </div>
    </div>
    <div class="list table-list ">
      <div class="info-title">付款明细
      </div>
      <div class="info-title" ng-show="param.dealDetails.length">付款明细列表</div>
      <div class="table-item">
        <div class="list-item required">
          <div class="item-label">付款金额</div>
          <div class="flow-content">
            <input type="text" ng-model="param.amount" tel-directive />
          </div>
        </div>
        <div class="list-item required icon_more">
          <div class="item-label">收款人</div>
          <div class="flow-content">
            <input type="text" ng-model="param.acceptCompany" />
            <p class="project_name" ng-click="showSearchPicker()"></p>
          </div>
        </div>
        <div class="list-item required">
          <div class="item-label">收款人账号</div>
          <div class="flow-content">
            <input type="text" ng-model="param.acceptAccount" />
          </div>
        </div>
        <div class="list-item required">
          <div class="item-label">收款人开户行</div>
          <div class="flow-content">
            <input type="text" ng-model="param.acceptBank" />
          </div>
        </div>
        <div class="list-item required icon_more">
          <div class="item-label">工程款大类</div>
          <label class="flow-content">
            <select ng-model="param.payType1" ng-options="item.value as item.key for item in gckTypeList" ng-change="payTypechange()">
            </select>
          </label>
        </div>
        <div class="list-item required icon_more">
          <div class="item-label">工程款小类</div>
          <label class="flow-content">
            <select ng-model="param.payType2" ng-options="item.value as item.key for item in gckTypeListA">
            </select>
          </label>
        </div>
        <div class="list-item icon_more" ng-click="chooseContract()">
          <div class="item-label">通用合同</div>
          <div class="flow-content">
            {{param.commonContractNo}}
          </div>
        </div>
        <div class="list-item icon_more" ng-click="choosePayment()">
          <div class="item-label">成本发票</div>
          <div class="flow-content">{{param.paymentInvoiceNo}}</div>
        </div>
        <div class="list-item">
          <div class="item-label">付款事由</div>
          <div class="flow-content">
            <input type="text" ng-model="param.payRemark" />
          </div>
        </div>
        <div class="c-blue list-item tc" ng-click="showPayment()" ng-show="param.paymentList.length<1">+添加</div>
      </div>
      <div class="table-item" ng-repeat="item in param.paymentList">
        <div class="content" ng-class="{cur:$index==paymentIndex}" ng-click="resetlist()" ng-swipe-left="swipe($index)" ng-swipe-right="swipe(-1)">
          <div class="list-item">
            <div class="item-label">付款金额</div>
            <div class="flow-content">{{item.paymentAmount}}</div>
          </div>
          <div class="list-item">
            <div class="item-label">收款人</div>
            <div class="flow-content">{{item.acceptCompany}}</div>
          </div>
          <div class="list-item">
            <div class="item-label">收款人账号</div>
            <div class="flow-content">{{item.acceptAccount}}</div>
          </div>
          <div class="list-item">
            <div class="item-label">收款人开户行</div>
            <div class="flow-content">{{item.acceptBank}}</div>
          </div>
          <div class="list-item">
            <div class="item-label">工程款大类</div>
            <div class="flow-content">{{item.payType1}}</div>
          </div>
          <div class="list-item">
            <div class="item-label">工程款小类</div>
            <div class="flow-content">{{item.payType2}}</div>
          </div>
          <div class="list-item">
            <div class="item-label">通用合同</div>
            <div class="flow-content">
              {{item.commonContractNo}}
            </div>
          </div>
          <div class="list-item" >
            <div class="item-label">成本发票</div>
            <div class="flow-content">{{item.paymentInvoiceNo}}</div>
          </div>
          <div class="list-item">
            <div class="item-label">付款事由</div>
            <div class="flow-content">
              {{item.payRemark}}
            </div>
          </div>  
          <div class="c-blue list-item tc" ng-click="showPayment()" ng-show="$index==param.paymentList.length-1">+添加</div>
        </div>
        <div class="delete_icon icon_del" ng-click="deletedItem($index)"></div>
      </div>
    </div>
    <div class="info-title">扣款明细
    </div>
    <span class="c-blue list-item tc" ng-click="showDeducts()" ng-show="param.deductList.length<1">+添加</span>
    <div class="list table-list ">
      <div class="table-item" ng-repeat="item in param.deductList">
        <div class="content" ng-class="{cur:$index==deductListIndex}" ng-click="resetdeduct()" ng-swipe-left="swipededuct($index)"
          ng-swipe-right="swipededuct(-1)">
          <div class="list-item">
            <div class="item-label">扣款项目</div>
            <div class="flow-content">{{item.deductName}}</div>
          </div>
          <div class="list-item">
            <div class="item-label">扣款类型</div>
            <div class="flow-content" ng-switch="item.deductType">
              <span ng-switch-when="0">
                收入
              </span>
              <span ng-switch-when="1">
                押金
              </span>
              <span ng-switch-when="2">
                缴纳
              </span>
              <span ng-switch-when="3">
                暂扣
              </span>
            </div>
          </div>
          <div class="list-item">
            <div class="item-label">扣款金额</div>
            <div class="flow-content">{{item.deductAmount}}</div>
          </div>
          <div class="list-item">
            <div class="item-label">备注</div>
            <div class="flow-content">{{item.deductRemark}}</div>
          </div>
          <span class="c-blue list-item tc" ng-click="showDeducts()" ng-show="$index==param.deductList.length-1">+添加</span>
        </div>
        <div class="delete_icon icon_del" ng-click="deletedDeduct($index)"></div>
      </div>
    </div>
    <!-- 自定义字段 -->
    <div user-defined  param="param"  field-map="param.fieldMap" validation="validation" uid="param.uid" processid="param.processInstanceId"></div>
    <!-- 附件 -->
    <div class="file-upload" file-upload file-data="param.attachment">
    </div>
    <!-- 审查日志 -->
    <div log-list status="processStatus" taskid="process_id"></div>
  </div>
</div>
<!-- 删除流程 -->
<div delete-flow uid="param.uid" id="{{param.processInstanceId}}" submit="submit" validate="validate"></div>
<!-- 选择付款明细子项目 -->
<div class="list tablestyle pickceritem" ng-show="showCerPicker">
  <div class="list-item">
    <div class="list-item list-content required">
      <div class="col-1-4">付款金额</div>
      <div class="col-3-4">
        <input type="text" ng-model="picker.paymentAmount" tel-directive />
      </div>
    </div>
    <div class="list-item list-content required">
      <div class="col-1-4">收款人</div>
      <div class="col-3-4">
        <input type="text" ng-model="picker.acceptCompany" />
      </div>
    </div>
    <div class="list-item list-content required">
      <div class="col-1-4">收款人账号</div>
      <div class="col-3-4">
        <input type="text" ng-model="picker.acceptAccount" />
      </div>
    </div>
    <div class="list-item list-content required">
      <div class="col-1-4">收款人开户行</div>
      <div class="col-3-4">
        <input type="text" ng-model="picker.acceptBank" />
      </div>
    </div>
    <div class="list-item list-content required">
      <div class="col-1-4">工程款大类</div>
      <div class="col-3-4">
        <select ng-model="picker.payType1" ng-options="item.value as item.key for item in gckTypeList" ng-change="pickerPayTypechange()">
        </select>
      </div>
    </div>
    <div class="list-item list-content required">
      <div class="col-1-4">工程款小类</div>
      <div class="col-3-4">
        <select ng-model="picker.payType2" ng-options="item.value as item.key for item in gckTypeListB">
        </select>
      </div>
    </div>
    <div class="list-item list-content icon_enter" ng-click="chooseContract()">
      <div class="col-1-4">通用合同</div>
      <div class="col-3-4">
        {{picker.commonContractNo}}
      </div>
  </div>
  <div class="list-item list-content icon_enter" ng-click="choosePayment()">
      <div class="col-1-4">成本发票</div>
      <div class="col-3-4">{{picker.paymentInvoiceNo}}</div>
  </div>
  <div class="list-item list-content">
    <div class="col-1-4">付款事由</div>
    <div class="col-3-4">
      <input type="text" ng-model="picker.payRemark" />
    </div>
  </div>
  </div>
  <div class="pickceritem-btn tc flex">
    <div class="cancel" ng-click="cacelPayment()">取消</div>
    <div class="confirm" ng-click="addPayment()">确定</div>
  </div>
</div>
<div class="list tablestyle pickceritem" ng-show="showCerPicker2">
  <div class="list-item">
    <div class="list-item list-content required">
      <div class="col-1-4">扣款项目</div>
      <div class="col-3-4">
        <input type="text" ng-model="picker2.deductName" />
      </div>
    </div>
    <div class="list-item list-content required">
      <div class="col-1-4">扣款类型</div>
      <div class="col-3-4">
        <select ng-model="picker2.deductType" ng-options="item.value as item.key for item in deductTypes">
          <option value="">请选择</option>
        </select>
      </div>
    </div>
    <div class="list-item list-content required">
      <div class="col-1-4">扣款金额</div>
      <div class="col-3-4">
        <input type="text" ng-model="picker2.deductAmount" tel-directive/>
      </div>
    </div>
    <div class="list-item list-content">
      <div class="col-1-4">备注</div>
      <div class="col-3-4">
        <input type="text" ng-model="picker2.deductRemark" />
      </div>
    </div>
  </div>
  <div class="pickceritem-btn tc flex">
    <div class="cancel" ng-click="cacelDeducts()">取消</div>
    <div class="confirm" ng-click="addDeducts(picker2)">确定</div>
  </div>
</div>
<div search-input show-search-input="showSearchInput" apiurl="apiurl" handle-search="handleSearch" param="searchparam" title="searchtitle"/>
